package com.bainuo.doctor.common.image_support.imghandle.crop;

import android.content.Intent;

/**
 * Created by bainuo on 2017/2/10.
 */

public class ImageSysCrop extends BaseCrop {


//    @Override
//    public void cropImage(Uri uri) {
//
//        Intent intent = new Intent("com.android.camera.action.CROP");
//
//        intent.setDataAndType(uri, "image/*");
//
//        intent.putExtra("crop", "true");
//
////        intent.putExtra("aspectX", 2);
////
////        intent.putExtra("aspectY", 1);
////
////        intent.putExtra("outputX", outputX);
////
////        intent.putExtra("outputY", outputY);
////
//        intent.putExtra("scale", true);
////
////        intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
////
////        intent.putExtra("return-data", false);
////
////        intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString());
////
////        intent.putExtra("noFaceDetection", true); // no face detection
//        activity.startActivityForResult(intent, code);
//    }


//    @Override
//    public void cropImage(String path) {
//          cropImage(Uri.fromFile(new File(path)));
//    }

//    @Override
//    public Uri getUri(Intent data) {
//        if (data != null)
//            return data.getData();
//        return null;
//    }


    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {

//        if (requestCode == code){
//            if (resultCode == Activity.RESULT_OK){
//                Uri uri = data.getData();
//                cropImage(getBitmapPath(uri));
//            }
//        }
    }
}
